{App::registerCoreScript('jquery')}
{App::registerCoreScript('tiny_mce')}
{App::registerCoreScript('base')}
<form action="{$base_url}&action=clubs_save" method="post">
	<div class="collumns">
		<div class="collumn_2">
			<label for="club[description]">Описание</label>
			<textarea id="club[description]" name="club[description]" cols="30" rows="10" class="redactor">{$club->description}</textarea>
		</div>
		<div class="collumn_2">
			<div class="row">
				<label for="club[title]">Название</label>
				<input type="text" id="club[title]" name="club[title]" value="{$club->title}" />
			</div>
			<div class="row">
				<label for="club[alias]">Ссылка</label>
				<input type="text" id="club[alias]" name="club[alias]" value="{$club->alias}" />
			</div>
			<div class="row">
				<label for="club[category]">Категория</label>
				<select id="club[category]" name="club[category]">
					<option value="0">- Выбрать -</option>
					{foreach $categories as $category}
						{foreach $category->SubCategories as $subcat}
							<option{if $subcat->id == $club->category} selected="selected"{/if} value="{$subcat->id}">{$category->title} - {$subcat->title}</option>
						{/foreach}
					{/foreach}
				</select>
			</div>
			<div class="row">
				<label for="club[owner]">Создатель клуба</label>
				<select id="club[owner]" name="club[owner]">
					<option value="0">- Выбрать -</option>
					{foreach $users as $user}
						<option{if $user->id == $club->id} selected="selected"{/if} value="{$user->id}">{$user->login}</option>
					{/foreach}
				</select>
			</div>
			<div class="buttons">
				<input type="submit" value="Сохранить" class="save" />
				<input type="submit" value="Применить" name="apply" class="apply" />
				<input type="reset" value="Отменить" class="cancel" />
			</div>
		</div>
	</div>
</form>